﻿using System;
using System.Linq;
using System.Collections.Generic;
using NTTDATA.BEENChina.ResultCertification.Config;

namespace NTTDATA.BEENChina.ResultCertification.Checker.Numeric
{
    [Serializable]
    [VerfityAttribute(Id = "VerfityD0302", Name = "各工程多漏录检证", CategoryType = EnumCategoryType.数值, Model = true)]
    public class VerfityD0302 : VerfityMulitResult
    {
 

        public override bool CheckResult(List<List<string>> result1, string entryCommon1, List<List<string>> result2, string entryCommon2)
        {
            var resultA = result1.Select(t => t.Select(GetSpecialResult).ToList()).ToList();
            var resultB = result2.Select(t => t.Select(GetSpecialResult).ToList()).ToList(); 

            return new Verfity0302().CheckResult(resultA, entryCommon1, resultB, entryCommon2);
        }
         

        private string GetSpecialResult(string colResult)
        {
            var splitResult = new Split.SplitEntryResult(ChildImageObject.CategorySetting.DataFormat, colResult);

            return splitResult.GetNumeric(); 
        } 
    }
}